import {controller, get, post} from '../../decorator/router';

@controller('/user')
class Users {
  @get('/info')
  async userInfo(ctx:any, next:Function) {
    ctx.body = {
      code: 200,
      msg: 'success'
    }
  }

  @post('/send')
  async send(ctx:any, next:Function) {
    // console.log('ajax', ctx.sendMsg)
    // ctx.body = ctx.request.body;
    ctx.sendMsg('success', ctx.request.body)
  }
}
